package com.gandong8.es.tool.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
public class EsAnalyzerProperties implements Serializable {
    private static final long serialVersionUID = 7331122414228560699L;
    @JsonIgnore
    private String name;
    @JsonIgnore
    private EsAnalyzer esAnalyzer;
    private String type;

    public String getType() {
        return esAnalyzer.name();
    }
    /**
     *  最大token长度，默认255
     */
    private int max_token_length;
    /**
     *  预定义的停止词列表，如 _end_ 或 包含停止词列表的数组，默认是 _none_
     */
    private String stopwords;
    /**
     *  包含停止词的文件路径
     */
    private String stopwords_path;
}
